home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / MacApp Documentation / MacApp AppleLink Messages / MacApp.Tech$ Jun 89 / V0029-MacApp Document Q's-Jun89 < prev    next >
Encoding:
Text File  |  1989-06-26  |  3.4 KB  |  92 lines  |  [TEXT/GEOL]

  1. Item    4901396                         9-June-89        11:24
  2.  
  3. From:   CDA0400                         DEV Isolation Systems
  4.  
  5. To:     MACAPP.TECH$                    MACAPP Tech
  6.  
  7. Sub:    MacApp Document Q's?
  8.  
  9. To:     Macintosh Developers technical Support
  10.         AppleLink:  MACDTS
  11.  
  12. From:   David Fleming
  13.         Isolation Systems Ltd.
  14.         AppleLink address: CDA0400
  15.  
  16. Re: MacApp Document Questions.
  17.  
  18. I just know that you are expecting some arcane security-related question, but I
  19. decided to change topics for this memo.
  20.  
  21. For our security project we are going to be creating one medium-sized
  22. application and two additional mini-applications. As I have long been a
  23. promoter of object-oriented programming (even before it was trendy to do so), I
  24. chose MacApp as a starting point. Here are my questions...
  25.  
  26. Question #1:
  27. In this particular situation I want to use a disk-based document that will
  28. contain the parameters for the application, similar to globals. There are few
  29. enough of them that I can hold them all in memory at one time. I would like
  30. this information to be loaded from disk into memory upon startup from the
  31. finder, BUT, I do not want it displayed in views until the user chooses the
  32. corresponding menu item. Different subsets of information from this document
  33. will be displayed in each of 4 windows with their corresponding subviews (from
  34. resource 'view' templates). These windows can be opened at any time by the
  35. user, and any or all of them can be open at once. They represent different
  36. areas of configuration for our hardware product.
  37. I am uncertain as to the best way to implement this structure in MacApp. I am
  38. not sure to what lengths MacApp goes on startup based on the objects and
  39. methods created.
  40.  
  41. If I supply a TMyApplication.DoMakeDocument does MacApp want to display this
  42. document or just create it?
  43.  
  44. Should I Override TMyDocument.DoMakeViews to do nothing and leave this until
  45. later by menu command?
  46.  
  47. Also, because I want MacApp to open an existing file (not a NEW document), how
  48. do I get it to do this?
  49.  
  50. Should I be overriding TMyApplication.HandleFinderRequest to not open the
  51. document upon startup, but handle it another way?
  52.  
  53. Question #2:
  54. Each of the configuration windows has its own menu in addition to the standard
  55. Apple,File,Edit and my 'Window' and 'Help' menus. The menubar must be toggled
  56. each time a new window is opened or when the user brings one of the other
  57. windows to the front. I have added other cmnu and mbar resources as outlined
  58. below:
  59.  
  60. /* Menu def'n for the System Setup menu*/
  61. resource 'cmnu' (6) {
  62.    6,
  63.    textMenuProc,
  64.    allEnabled,
  65.    enabled,
  66.    "System Setup",
  67.     {  /* array: 2 elements */
  68.    /* [1] */
  69.    "Set ISAC Time", noIcon, "Z", noMark, plain, cSystemTime;
  70.    /* [2] */
  71.    "View Setup", noIcon, noKey, noMark, plain, cSystemView
  72.    }
  73. };
  74.  
  75. /* Menu bar wanted when System Setup Window Active */
  76. resource 'MBAR' (130) {
  77.    {1; 2; 3; 4; 6; 5}
  78. };
  79.  
  80. Is this the correct way in MacApp?
  81. And if so, how do I install these menus, and in what methods?
  82.     (my guess is to have them in the TTheParticularWindow.DoSetupMenus to
  83. initialize them the first time, but I don't know where to put them when
  84. toggling from window to window.)
  85.  
  86. A small section of sample code would be an immense help.
  87.  
  88. Thank you for any help that you can shed on these issues. While I understand
  89. the methodology behind MacApp, I do not know what it expects and how it will
  90. react to non-standard situations.
  91.  
  92.